package com.cqkjxy.commons.repositories;

import com.cqkjxy.commons.entities.AbstractStatefulEntity;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;
import org.springframework.data.repository.NoRepositoryBean;

import java.util.List;

@NoRepositoryBean
public interface AbstractStatefulRepository<T extends AbstractStatefulEntity> extends AbstractRepository<T> {
    List<T> findByStatus(int status);
    List<T> findByStatus(int status, Sort sort);
    Page<T> findByStatus(int status, Pageable pageable);
}
